package com.example.demo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
@TableName("contacts")
public class Contacts {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    @TableField("contact_id")
    private Long contactId;
    
    @TableField("user_id")
    private Long userId;
    
    @TableField("remark_name")
    private String remarkName;
    
    @TableField("group_name")
    private String groupName;
    
    @TableField("relation_status")
    private Integer relationStatus;
    
    @TableField("is_blacklisted")
    private Boolean isBlacklisted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("last_chat_time")
    private Date lastChatTime;
    
    @TableField(exist = false)
    private User contactUser; // 联系人用户信息
}